package client.whiteboard.model;

import java.io.Serializable;
import java.util.LinkedList;
import java.util.ListIterator;

public class DrawingData implements Serializable
{
	public LinkedList<Line> _lines;
	public LinkedList<Point> _points;
	public DrawingData(ListIterator<LinkedList> li)
	{
		_lines = new LinkedList();
		_points = new LinkedList();
		while(li.hasNext())
		{
			ListIterator it = ((LinkedList)(li.next())).listIterator();
			while(it.hasNext())
			{
				Line line = (Line)(it.next());
				Point p1 = line.getP1();
				Point p2 = line.getP2();
				Line lineCopy = new Line(new Point(p1.getPx(), p1.getPy()), new Point(p2.getPx(), p2.getPy()), line.getSize());
				_lines.add(lineCopy);
			}
		}
	}
}
